{include file='common/flowheader' /}
<style>
    .thumbnail{
        pointer-events: all !important;
    }
    .content {
        padding: 15px;
    }
</style>
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="">
        <div class="form-group form-handle">
            <label class="control-label col-xs-12 col-sm-3">{:__('流程标题')}:</label>
            <div class="col-xs-12 col-sm-7">
                <label class="control-label"><strong>{$scheme->flowname}_{$instance->instancecode}</strong></label>
            </div>
        </div>

        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-3">申请人:</label>
            <div class="col-xs-12 col-sm-7">
                <label class="control-label"> {$originator->nickname}</label>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-3">{:__('Cname')}:</label>
            <div class="col-xs-12 col-sm-7">
                <input id="c-cname" data-rule="" class="form-control" name="row[cname]" type="text" value="{$row.cname}" disabled>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-3">{:__('jiafang')}:</label>
            <div class="col-xs-12 col-sm-7">
                <input id="c-jiafang" data-rule="" class="form-control" name="row[jiafang]" type="text" value="{$row.jiafang}" disabled>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-3">{:__('Partner')}:</label>
            <div class="col-xs-12 col-sm-7">
                <input id="c-partner" data-rule="" class="form-control" name="row[partner]" type="text" value="{$row.partner}" disabled>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-3">{:__('Department_id')}:</label>
            <div class="col-xs-12 col-sm-7">
                <input id="c-department_id" data-rule="" data-source="department/index/selectpage" class="form-control selectpage" name="row[department_id]" type="text" value="{$row.department_id}" disabled>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-3">{:__('Participating_departments')}:</label>
            <div class="col-xs-12 col-sm-7">
                {$participatingList}
            </div>
        </div>
		
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-3">职能部门</label>
            <div class="col-xs-12 col-sm-7">
                <input id="c-department_id" data-rule="" data-source="department/index/selectpage" 
				class="form-control selectpage" name="row[divisions]" type="text" value="{$row.divisions}" disabled>
            </div>
        </div>

        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-3">{:__('Type')}:</label>
            <div class="col-xs-12 col-sm-7">
                <select  id="c-type" data-rule="" class="form-control selectpicker" name="row[type]" disabled>
                    {foreach name="typeList" item="vo"}
                    <option value="{$key}" {in name="key" value="$row.type"}selected{/in}>{$vo}</option>
                    {/foreach}
                </select>
            </div>
        </div>
      
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-3">{:__('Contacts')}:</label>
            <div class="col-xs-12 col-sm-7">
                <input id="c-contacts" data-rule="" class="form-control" name="row[contacts]" type="text" value="{$row.contacts}" disabled>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-3">{:__('Mobile')}:</label>
            <div class="col-xs-12 col-sm-7">
                <input id="c-mobile" data-rule="" class="form-control" name="row[mobile]" type="number" value="{$row.mobile}" disabled>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-3">{:__('Counterpart')}:</label>
            <div class="col-xs-12 col-sm-7">
                <input id="c-counterpart" data-rule="" class="form-control" name="row[counterpart]" type="text" value="{$row.counterpart}" disabled>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-3">{:__('Counterpart_mobile')}:</label>
            <div class="col-xs-12 col-sm-7">
                <input id="c-counterpart_mobile" data-rule="" class="form-control" name="row[counterpart_mobile]" type="number" value="{$row.counterpart_mobile}" disabled>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-3">{:__('Remarks')}:</label>
            <div class="col-xs-12 col-sm-7">
                <textarea id="c-remarks" data-rule="" class="form-control " rows="5" name="row[remarks]" cols="50" disabled>{$row.remarks}</textarea>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-3">{:__('Agreementfile')}:</label>
            <div class="col-xs-12 col-sm-7">
                <div class="input-group">
				{if $row.agreementfile != ''}
				<a href="{$row.agreementfile}">下载</a>
				{/if}
                    <!--input id="c-agreementfile" data-rule="" class="form-control" size="50" name="row[agreementfile]" type="text" value="{$row.agreementfile}" disabled-->
<!--                    <div class="input-group-addon no-border no-padding">-->
<!--                        <span><button type="button" id="plupload-agreementfile" class="btn btn-danger plupload" data-input-id="c-agreementfile" data-multiple="false" data-preview-id="p-agreementfile"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>-->
<!--                        <span><button type="button" id="fachoose-agreementfile" class="btn btn-primary fachoose" data-input-id="c-agreementfile" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>-->
<!--                    </div>-->
                    <span class="msg-box n-right" for="c-agreementfile"></span>
                </div>
                <ul class="row list-inline plupload-preview" id="p-agreementfile"></ul>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-3">{:__('Agreement')}:</label>
            <div class="col-xs-12 col-sm-7">
                <div class="input-group">
                    <!--input id="c-agreement" data-rule="" class="form-control" size="50" name="row[agreement]" type="text" value="{$row.agreement}" disabled-->
<!--                    <div class="input-group-addon no-border no-padding">-->
<!--                        <span><button type="button" id="plupload-agreement" class="btn btn-danger plupload" data-input-id="c-agreement" data-multiple="false" data-preview-id="p-agreement"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>-->
<!--                        <span><button type="button" id="fachoose-agreement" class="btn btn-primary fachoose" data-input-id="c-agreement" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>-->
<!--                    </div>-->
				{if $row.agreement != ''}
				<a href="{$row.agreement}">下载</a>
				{/if}
                    <span class="msg-box n-right" for="c-agreement"></span>
                </div>
                <ul class="row list-inline plupload-preview" id="p-agreement"></ul>
            </div>
        </div>
		
		  <div class="form-group">
            <label class="control-label col-xs-12 col-sm-3">{:__('Startdate')}:</label>
            <div class="col-xs-12 col-sm-7">
                <input id="c-startdate" data-rule="" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[startdate]" type="text" value="{$row.startdate}" disabled>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-3">{:__('Enddate')}:</label>
            <div class="col-xs-12 col-sm-7">
                <input id="c-enddate" data-rule="" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[enddate]" type="text" value="{$row.enddate}" disabled>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-3">{:__('Signingperiod')}:</label>
            <div class="col-xs-12 col-sm-7">
                <input id="c-signingperiod" data-rule="" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[signingperiod]" type="text" value="{$row.signingperiod}" disabled>
            </div>
        </div>
		
		
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-3">{:__('Scansion')}:</label>
            <div class="col-xs-12 col-sm-7">
                <div class="input-group">
					{if $row.scansion != ''}
				<a href="{$row.scansion}">下载</a>
				{/if}
                    <!--input id="c-scansion" data-rule="" class="form-control" size="50" name="row[scansion]" type="text" value="{$row.scansion}" disabled-->
<!--                    <div class="input-group-addon no-border no-padding">-->
<!--                        <span><button type="button" id="plupload-scansion" class="btn btn-danger plupload" data-input-id="c-scansion" data-multiple="false" data-preview-id="p-scansion"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>-->
<!--                        <span><button type="button" id="fachoose-scansion" class="btn btn-primary fachoose" data-input-id="c-scansion" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>-->
<!--                    </div>-->
                    <span class="msg-box n-right" for="c-scansion"></span>
                </div>
                <ul class="row list-inline plupload-preview" id="p-scansion"></ul>
            </div>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">审批历史</label>
        <div class="col-xs-12 col-sm-8">
            <table class="table table-striped">
                <thead>
                <tr>
                    <td>审批人</td>
                    <td>审批步骤</td>
                    <td>审批意见</td>
                    <td>附件</td>
                    <td>审批时间</td>
                </tr>
                </thead>
                <tbody>
                {volist name="history" id="vo" }
                <tr>
                    <td>{$vo.nickname}</td>
                    <td>{$vo.stepname}</td>
                    <td>{$vo.comment}</td>
                    <td>
                        {if condition="$vo.cfile neq '' "}

                        <a href='{$vo.cfile}'>下载</a>
                        {/if}
                    </td>
                    <td>{$vo.completedtime}</td>

                </tr>
                {/volist}
                </tbody>
            </table>
        </div>
    </div>

    <div class="form-group layer-footer">
        <div class="col-xs-12 col-sm-12" style="text-align: center;">
            <button type="button" id='flowchart-show' data-insta class="btn btn-warning btn-embossed">{:__('流程图')}</button>
        </div>
    </div>

</form>